module.exports={
    add(data){
        return request({
            url: '/sys-user',
            headers: {},
            method: 'post',
            data: Object.assign(data,{password:null})
        });
    },
    edit(data){
        return request({
            url: '/sys-user',
            headers: {},
            method: 'put',
            data: Object.assign(data,{password:null})
        });
    },
    remove(data){
        return request({
            url: '/sys-user/'+data,
            headers: {},
            method: 'delete'
        });
    },
    list(data){
        return request({
            url: '/sys-user/list',
            headers: {},
            method: 'get',
            params: data
        });
    },
    resetPassword(userId){
        return request({
            url: `/sys-user/${userId}/reset-password`,
            headers: {},
            method: 'get'
        });
    },
    loginUser(userId){
        return request({
            url: `/sys-user/login-user`,
            headers: {},
            method: 'get'
        });
    },
    changePwd(data){
        return request({
            url: `/sys-user/change-pwd`,
            headers: {},
            method: 'post',
            data:data
        });
    },
}
